- blame = local_assigns.fetch(:blame, false)
.nav-block
  .tree-controls
    = render 'projects/find_file_link'

    .btn-group.prepend-left-10{ role: "group" }<
      -# only show normal/blame view links for text files
      - if blob.readable_text?
        - if blame
          = link_to 'Normal view', namespace_project_blob_path(@project.namespace, @project, @id),
              class: 'btn'
        - else
          = link_to 'Blame', namespace_project_blame_path(@project.namespace, @project, @id),
              class: 'btn js-blob-blame-link' unless blob.empty?

      = link_to 'History', namespace_project_commits_path(@project.namespace, @project, @id),
          class: 'btn'

      = link_to 'Permalink', namespace_project_blob_path(@project.namespace, @project,
          tree_join(@commit.sha, @path)), class: 'btn js-data-file-blob-permalink-url'

  .tree-ref-holder
    = render 'shared/ref_switcher', destination: 'blob', path: @path

  %ul.breadcrumb.repo-breadcrumb
    %li
      = link_to namespace_project_tree_path(@project.namespace, @project, @ref) do
        = @project.path
    - path_breadcrumbs do |title, path|
      - title = truncate(title, length: 40)
      %li
        - if path == @path
          = link_to namespace_project_blob_path(@project.namespace, @project, tree_join(@ref, path)) do
            %strong= title
        - else
          = link_to title, namespace_project_tree_path(@project.namespace, @project, tree_join(@ref, path))
